package cn.zcy.springbootlogging;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
//使用此注解必须添加@Slf4j，lombok依赖
public class Application {
 static Logger logger= LoggerFactory.getLogger(Application.class); //相当于 使用此注解必须添加@Slf4j，lombok依赖
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
        System.out.println("LOG_DATEFORMAT_PATTERN======>"+System.getProperty("LOG_DATEFORMAT_PATTERN"));
        logger.trace("跟踪");
        logger.debug("调试");
        logger.info("信息");
        logger.warn("警告");
        logger.error("错误");
        System.out.println("使用SYS答应日志");
        for (int i = 0; i < 10; i++) {
            logger.info("日志轮播");
        }
    }

}
